# Replication Materials for paper "Do More Disaggregated Electoral Results Deter Aggregation Fraud?"

Journal: British Journal of Political Science
Authors: Miguel R. Rueda, Guy Grossman, Shuning Ge

## Computer Requirements
All our findings could be replicated exactly under the computing environment described in the following:

1. Computer System: MacBook Pro, Apple M1 Max chip, 64GB memory, Sequoia 15.4.1

2. R versions and packages versions
3. 
```{r}
platform       aarch64-apple-darwin20      
arch           aarch64                     
os             darwin20                    
system         aarch64, darwin20           
status                                     
major          4                           
minor          5.0                         
year           2025                        
month          04                          
day            11                          
svn rev        88135                       
language       R                           
version.string R version 4.5.0 (2025-04-11)
nickname       How About a Twenty-Six 

R version 4.5.0 (2025-04-11)
Platform: aarch64-apple-darwin20
Running under: macOS Sequoia 15.5

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.12.1

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: America/New_York
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices datasets  utils     methods   base     

other attached packages:
 [1] panelView_1.1.18   gridExtra_2.3      tinytable_0.9.0    fixest_0.12.1     
 [5] texreg_1.39.4      modelsummary_2.3.0 lubridate_1.9.4    forcats_1.0.0     
 [9] stringr_1.5.1      dplyr_1.1.4        purrr_1.0.4        readr_2.1.5       
[13] tidyr_1.3.1        tibble_3.2.1       ggplot2_3.5.2      tidyverse_2.0.0   

loaded via a namespace (and not attached):
 [1] sandwich_3.1-1      generics_0.1.4      renv_1.1.4         
 [4] dreamerr_1.5.0      stringi_1.8.7       lattice_0.22-6     
 [7] hms_1.1.3           digest_0.6.37       magrittr_2.0.3     
[10] evaluate_1.0.3      grid_4.5.0          timechange_0.3.0   
[13] RColorBrewer_1.1-3  fastmap_1.2.0       Formula_1.2-5      
[16] httr_1.4.7          scales_1.4.0        stringmagic_1.2.0  
[19] numDeriv_2016.8-1.1 cli_3.6.5           rlang_1.1.6        
[22] withr_3.0.2         tools_4.5.0         tzdb_0.5.0         
[25] vctrs_0.6.5         R6_2.6.1            zoo_1.8-14         
[28] lifecycle_1.0.4     pkgconfig_2.0.3     pillar_1.10.2      
[31] gtable_0.3.6        data.table_1.17.2   glue_1.8.0         
[34] Rcpp_1.0.14         xfun_0.52           tidyselect_1.2.1   
[37] rstudioapi_0.17.1   knitr_1.50          farver_2.1.2       
[40] htmltools_0.5.8.1   nlme_3.1-168        tables_0.9.31      
[43] compiler_4.5.0
```

## Folders, Contents and Dependencies

Instructions to replicate the results: 
1) Download replication folder, 
2) Set as working directory the Code subfolder, 
3) Run the code in Replication.R.

All tables and figures will be saved in the **Results/Figures** and **Results/Tables** subfolders. Note that all tables and figures could be re-produced by running Replication.R except for Table A1, A2, and B3 in the SI that are manually generated.  

- `README.md`: This README file explains the structure and contents of the replication folder, presents the computing environment, and provides necessary instructions of the replication script.
- `Codebook.pdf`: This codebook describes all the datasets and their variables listed in the **Data** folder.
- Code:
  - `Replication.R`: This is the main script that contains codes that produce all the figures and tables in the main paper as well as in the Supplementary Information (a.k.a. Appendix).
- Data:
  - `mainData_period.csv`: The main dataset that is used in analysis. The unit of analysis is country - election-type - period (every 5 years).
  - `mainDaata_yearly.csv`: The supplementary dataset that is used in robustness checks presented in the Supplementary Information. The unit of analysis is country - election-type - year.
  - `Provenance Dataset.csv`: The master dataset that contains information on data gathering process. 
  - `vdem.csv`: Processed V-Dem data that matching the observations of our dataset. Major processes include: harmonizing the country name, select variables that are needed for our analysis.
- Results:
  - Figures:
  - Tables: